<template>
  <div class="bg">
    <div class="bg_content">
      <div class="bg_left">
        <el-carousel height="800px">
          <el-carousel-item v-for="(item,index) in bgList" :key="index">
            <div :class="item.background">
              <div class="welcome">{{item.name}}</div>
              <div class="title_name">{{item.title}}</div>
            </div>
          </el-carousel-item>
        </el-carousel>
      </div>
      <div class="bg_right">
        <div class="login_title">
          <div>
            <img class="login_img" src="../assets/img/login-logo.png" alt />
          </div>
        </div>
        <login :url="url" class="login" :go="go">
          <div slot="default">
            <el-form-item>
              <a :href="register" v-if="register">注册新账号</a>
              <a :href="forget" style="float: right" v-if="forget">忘记密码</a>
            </el-form-item>
          </div>
        </login>
		<div class="text_bottom">京ICP备11017824号-4 / 京ICP证130164号 北京市公安局朝阳分局备案编号:110105000501</div>
		<div class="name_login">Copyright © 2006-2018 ZCOOL 中文 English</div>
      </div>
    </div>
  </div>
</template>

<script>
import login from "./components/login";

export default {
  name: "loginView",
  components: {
    login
  },
  props: {
    register: {
      type: String,
      default: ""
    },
    forget: {
      type: String,
      default: ""
    },
    url: {
      type: String,
      default: "Admin/account/login"
    },
    go: {
      type: String,
      default: "home"
    }
  },
  data() {
    return {
      bgList: [
        {
          background: "background1",
          name: "Welcome to",
          title: "PAA美容联盟管理平台中心"
        }
        /* ,{
					background:'background2',
					name:'Welcome to',
					title:'PAA美容联盟管理平台中心'
				},{
					background:'background3',
					name:'Welcome to',
					title:'PAA美容联盟管理平台中心'
				}, */
      ]
    };
  }
};
</script>

<style scoped lang="less">
	.text_bottom,.name_login{
		font-size:12px;
		font-weight:300;
		color:rgba(75,75,75,0.54);
	}
	.text_bottom{margin-top: 50px;}
	.name_login{
		margin-top: 20px;
	}
.bg {
  width: 100vw;
  height: 100vh;
  background: #f2f3f5;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  .bg_content {
    width: 1300px;
    height: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
  }
  .bg_left {
    width: 425px;
    height: 100%;
  }
  .bg_right {
    width: 875px;
    height: 100%;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    .bg_wrap {
      width: 50%;
    }
    .login_title {
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      margin: 60px 0;
    }
  }
}
.welcome {
  font-size: 48px;
  font-family: PingFang SC;
  font-weight: 100;
  color: rgba(255, 255, 255, 1);
  text-align: center;
  padding-top: 140px;
}
.title_name {
  font-size: 24px;
  font-family: Arial;
  font-weight: bold;
  color: rgba(255, 255, 255, 1);
  text-align: center;
}
.background1 {
  background: url(./bg.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  height: 100%;
}
.background2 {
  background: url(./bg1.jpg);
  background-repeat: no-repeat;
  background-size: auto;
  height: 100%;
}
.background3 {
  background: url(./bg2.png);
  background-repeat: no-repeat;
  background-size: auto;
  height: 100%;
}
.login_img{
	width: 160px;
	height: 40px;
}
/* .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 150px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
     background-color: #99a9bf;
  }
  
  .el-carousel__item:nth-child(2n+1) {
     background-color: #d3dce6;
  } */
</style>